﻿using Commons.Responses;
using EntityModels.E04.Interactions;
using EntityModels.E05.Reports;
using IRepositories;
using Microsoft.EntityFrameworkCore;
using ORM;
using System.Linq.Expressions;

namespace Repositories
{
    public class ReportTypeRepository : BaseRepository<int, ReportType>, IBaseRepository<int, ReportType>
    {
        public ReportTypeRepository(PSPDbContext context) : base(context)
        {
        }
        //public override async Task<DatasResponse<ReportType>> GetAllAsync(Expression<Func<ReportType, bool>> predicate, Dictionary<string, bool> orderByFields = null)
        //{
        //    IQueryable<Star> dbSet = Context.Set<ReportType>().Include(x => x.Children).ThenInclude(x => x.);
        //    dbSet = dbSet.OrderByDescending(x => x.UpdateTime);
        //    var datas = await dbSet.Where(predicate).ToListAsync();
        //    var total = await dbSet.CountAsync();
        //    var result = new DatasResponse<ReportType>(total, datas);
        //    return result!;
        //}
    }
}
